package org.springframework.ioc.beanfactory.pojo;

import org.springframework.beans.BeansException;
import org.springframework.beans.factory.BeanClassLoaderAware;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.BeanFactoryAware;
import org.springframework.beans.factory.BeanNameAware;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.context.ResourceLoaderAware;
import org.springframework.core.io.ResourceLoader;

public class BeanAware implements BeanClassLoaderAware,
		BeanFactoryAware, BeanNameAware,ResourceLoaderAware{

	public BeanAware(){
		System.out.println("baseBase invoke");
	}
	@Override
	public void setBeanName(String name) {
		System.out.println(getClass().getName()+":name has set[" + name+"]");
	}

	@Override
	public void setBeanFactory(BeanFactory beanFactory) throws BeansException {
		System.out.println(getClass().getName()+":bean factory has set[" + beanFactory.toString()+"]");
	}

	@Override
	public void setBeanClassLoader(ClassLoader classLoader) {
		System.out.println(getClass().getName()+":bean classLoader has set[" + classLoader.toString()+"]");
	}
	@Override
	public void setResourceLoader(ResourceLoader resourceLoader) {
		System.out.println(getClass().getName()+":bean resourceLoader has set[" + resourceLoader.toString()+"]");
	}



}
